package com.zq.structure.proxy;

public class ProxyStudent implements Student {
    private Student student;

    public ProxyStudent() {
        student = new ConcreteStudent();
    }

    @Override
    public void goToSchool() {
        System.out.println("Mum, I have finished my breakfast.");
        student.goToSchool();
    }

    @Override
    public void goHome() {
        student.goHome();
        System.out.println("Mum, I am back.");
    }
}
